package com.ssm.spring.aop.annotation;

import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;

/**
 * Author  zxy
 * Date  2022/11/12 上午 10:48
 */
@Component
@Aspect
@Order(1)  // 设置优先级：value值越小，切面优先级越高，默认值为Integer最大值
public class validateAspect {

    // @Before("execution(* com.ssm.spring.aop.annotation.CalculatorImpl.*(..))")
    @Before("com.ssm.spring.aop.annotation.LoggerAspect.pointCut()")
    public void beforeMethod(){
        System.out.println("ValidateAspect-->前置通知");
    }

}
